﻿using Ymatou.Evaluate.Common;
using Ymatou.Evaluate.Data.Operator;
using Ymatou.Evaluate.Entity;

namespace Ymatou.Evaluate.Service
{
    public class OperatorService
    {
        /// <summary>
        /// 新增回复
        /// </summary>
        /// <param name="reply"></param>
        /// <returns></returns>
        public bool AddReply(EvaluateReply reply)
        {
            var replyComments = reply.OrigReply;
            reply.IsSensitive = BanWordUtil.GetComments(ref replyComments);
            reply.Reply = reply.IsSensitive ? replyComments : reply.OrigReply;
            return EvaluateOperatorData.AddReply(reply);
        }
    }
}
